import train
import argparse



if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='Run training script with given parameters.')
    parser.add_argument('trainMissionId', type=int, help='trainMissionId.')
    parser.add_argument('modelName', type=str, help='The model to use.')
    parser.add_argument('model_User_id', type=str, help='The dataset to use.')
    parser.add_argument('datasetTrain', type=str, help='The dataset to use.')
    parser.add_argument('datasetTrainName', type=str, help='The datasetTrainName to use.')
    parser.add_argument('datasetVal', type=str, help='The dataset to use.')
    parser.add_argument('DatasetNameVal', type=str, help='The dataset to use.')
    parser.add_argument('batchSize', type=int, help='The batch size.')
    parser.add_argument('epochMin', type=int, help='The number of epochs.')
    parser.add_argument('epoch', type=int, help='The number of epochs.')
    parser.add_argument('earlyStop', type=int, help='Whether to use early stopping.')
    parser.add_argument('lr', type=float, help='Learning Rate.')
    parser.add_argument('modelId', type=int, help='modelId.')
    parser.add_argument('imageSize', type=int, help='imageSize.')
    parser.add_argument('inputChan', type=int, help='inputChan.')
    parser.add_argument('outChan', type=int, help='outChan.')
    args = parser.parse_args()

    train.Run(args.trainMissionId, args.modelName, args.model_User_id, args.datasetTrain, args.datasetTrainName, args.datasetVal,
        args.DatasetNameVal, args.batchSize,args.epochMin ,args.epoch, args.earlyStop, args.lr, args.modelId,args.imageSize,args.inputChan,args.outChan)



    # # #
    # train.Run(1, "UNet", 1, 'E:/Detection20250314/src/main/resources/datasets/1/cd/', "cd",
    #           'E:/Detection20250314/src/main/resources/datasets/1/cd/', "cd",
    #           4, 10, 20, 5, 0.001, 199, 512, 3, 2)
